
var myChart = echarts.init(document.getElementById('topic_time'));
option = {
    legend:{
        data: ["本周", "上周"],
        textStyle: {fontSize: 16}
    },
    xAxis: {
        type: 'category',
        data: ["2020-11-16", "2020-11-17", "2020-11-18", "2020-11-19", "2020-11-20", "2020-11-21", "2020-11-22"]
    },
    yAxis: {
        type: 'value'
    },
    series: [
        {
            data: [3293.5,3945.6,3760.9,996.6,3481.6,4514.9,3223.5],
            name: "本周",
            smooth: true,
            type: "line",
            areaStyle: {
                color: 'rgba(52,144,220,0.3)' // 设置为系列的颜色，例如 'rgba(52,144,220,0.3)'（蓝色透明度为0.3）
            }
        },
        {
            data: [1553.9,1180.8,2583.9,2488.5,1890,1881.3,3258.5],
            name: "上周",
            smooth: true,
            type: "line",
            areaStyle: {
                color: 'rgba(255,80,80,0.3)' // 设置为系列的颜色，例如 'rgba(255,80,80,0.3)'（红色透明度为0.3）
            }
        }
        ]
};
myChart.setOption(option);
window.addEventListener("resize", function () {
    myChart.resize();
});


